{extend name="public:layout" /}
{block name="title"}添加表单{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li>
                    <i class="fa fa-hand-o-right"></i>
                    <a href="{:url('index')}">自定义表单</a>
                </li>
                <li class="active">添加表单</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label">表单名称</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入表单名称"
                               name="form_name" datatype="*"
                               nullmsg="请输入表单名称！" errormsg=""/>
                    </div>
                    <label class="col-sm-2 control-label">数据表名</label>
                    <div class="col-sm-4">
                        <div class="input-group">
                            <span class="input-group-addon">form_</span>
                            <input type="text" class="form-control"
                                   name="table_name" datatype="*"
                                   nullmsg="请输入数据表名！" errormsg="" />
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">提交成功提示消息</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" placeholder="请输入提示消息"
                               name="success_msg" datatype="*" value="恭喜,您的信息已提交成功!"
                               nullmsg="请输入提示消息！" errormsg=""/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">表单描述</label>

                    <div class="col-sm-10">
                        <textarea class="form-control" name="form_desc" rows="3"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">状态</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks">
                            <input type="radio" name="form_status" value="1" checked /> 开启
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="form_status" value="0" /> 锁定
                        </label>
                    </div>
                    <label class="col-sm-2 control-label">系统内置</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks">
                            <input type="radio" name="is_system" value="1" /> 是
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="is_system" value="0" checked /> 否
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">开启验证码</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks">
                            <input type="radio" name="form_code" value="1" /> 是
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="form_code" value="0" checked /> 否
                        </label>
                    </div>
                    <label class="col-sm-2 control-label">排序</label>

                    <div class="col-sm-2">
                        <input type="text" class="form-control" placeholder="请输入排序"
                               name="form_sort" value="0" datatype="*"
                               nullmsg="请输入排序！" errormsg=""/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" id="btnSub">
                            保存内容
                        </button>
                        <a href="{:url('index')}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        ajaxSubForm('#btnSub');
    })
</script>
{/block}